home *** CD-ROM | disk | FTP | other *** search
-
-
-
- PROFIL C Library Procedures PROFIL
-
-
-
- NNAAMMEE
- profil - execution time profile
-
- SSYYNNOOPPSSIISS
- pprrooffiill((bbuuffff,, bbuuffssiizz,, ooffffsseett,, ssccaallee))
- cchhaarr **bbuuffff;;
- iinntt bbuuffssiizz,, ooffffsseett,, ssccaallee;;
-
- DDEESSCCRRIIPPTTIIOONN
- pprrooffiill(()) enables run-time execution profiling, and reserves
- a buffer for maintaining raw profiling statistics. _b_u_f_f
- points to an area of core of length _b_u_f_s_i_z (in bytes).
- After the call to pprrooffiill, the user's program counter (pc) is
- examined at each clock tick (10 milliseconds on Sun-4 sys-
- tems, 20 milliseconds on Sun-2 and Sun-3 systems); _o_f_f_s_e_t is
- subtracted from its value, and the result multiplied by
- _s_c_a_l_e. If the resulting number corresponds to a word within
- the buffer, that word is incremented.
-
- _s_c_a_l_e is interpreted as an unsigned, fixed-point fraction
- with binary point at the left: 0x10000 gives a 1-to-1 map-
- ping of pc values to words in _b_u_f_f; 0x8000 maps each pair of
- instruction words together. 0x2 maps all instructions onto
- the beginning of _b_u_f_f (producing a non-interrupting core
- clock).
-
- Profiling is turned off by giving a _s_c_a_l_e of 0 or 1. It is
- rendered ineffective by giving a _b_u_f_s_i_z of 0. Profiling is
- turned off when an eexxeeccvvee(()) is executed, but remains on in
- child and parent both after a ffoorrkk(()). Profiling is turned
- off if an update in _b_u_f_f would cause a memory fault.
-
- RREETTUURRNN VVAALLUUEE
- A 0, indicating success, is always returned.
-
- SSEEEE AALLSSOO
- ggpprrooff(1), ggeettiittiimmeerr(2), mmoonniittoorr(3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 27 January 1988 1
-
-
-
-